package ie.lawlor.amvc.patterns.standard;

import ie.lawlor.amvc.controller.Controller;

/**
 * @author blawlor
 *
 */
public class StandardController extends Controller {

    public static final String OBJECTREMOVED = "standardObjectRemovedEvent";
    public static final String OBJECTUPDATED = "standardObjectUpdatedEvent";
    public static final String OBJECTADDED = "standardObjectAddedEvent";
    public static final String OK = "standardOkEvent";
	public static final String RESET = "standardResetEvent";
	public static final String CANCEL = "standardCancelEvent";
	public static final String MESSAGE = "standardMessageEvent";
	public static final String POPUP = "standardPopupEvent";

    

//    private void initConnections() {
//    	//TODO - These might not work! The getEvent might be passing back null as the events them
//    	// selves are set by Spring after the instanciation of this class. Move to xml or
//    	// call initConnections as part of the post-creation of the bean.
//		sendToModel(getEvent(OK));
//		sendToModel(getEvent(CANCEL));
//		sendToView(getEvent(MESSAGE));
//		sendToModel(getEvent(POPUP));
//		
//		sendToModel(getEvent(OBJECTADDED));
//		routeToChildren(getEvent(OBJECTADDED));
//		sendToModel(getEvent(OBJECTUPDATED));
//		routeToChildren(getEvent(OBJECTUPDATED));
//		sendToModel(getEvent(OBJECTREMOVED));
//		routeToChildren(getEvent(OBJECTREMOVED));
//    } 
    
}